#include <stdio.h>

int main(void)
{
    float height = 100;
    int i = 0;
    float s = height;                   //这是第一次落地时走过的路程，比较特殊
    for(i=1; i<=9; i++)
    {
        height /= 2;                    //第i+1次弹起的高度
        s = s + height * 2;             //第i+1次落地时走过的路程
        printf("height=%f\n", height);
    }

    printf("height=%f, s=%f\n", height, s);
    return 0;
}